import rclpy
from rclpy.node import Node
from std_msgs.msg import String

class Talker(Node):

    def __init__(self):
        super().__init__("talker")

        self.publisher_ = self.create_publisher(String,'aimoe_topic_py',10)

        self.timer = self.create_timer(0.5,self.talker_callback);

    def talker_callback(self):
        msg = String()
        msg.data = "hello py"
        self.publisher_.publish(msg)
        self.get_logger().info("send:%s"%msg.data)


def main(args = None):
    rclpy.init(args=args)
    
    talker = Talker()
    rclpy.spin(talker)
    rclpy.shutdown()


if __name__ == "__main__":
    main()
    


